home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / maestro / source / timeline / region_u.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-15  |  12.4 KB  |  491 lines

  1. /*
  2.  * Region_ui.c - User interface object initialization functions.
  3.  * This file was generated by `gxv' from `Region.G'.
  4.  * DO NOT EDIT BY HAND.
  5.  */
  6.  
  7. #include <stdio.h>
  8. #include <sys/param.h>
  9. #include <sys/types.h>
  10. #include <xview/xview.h>
  11. #include <xview/canvas.h>
  12. #include <xview/panel.h>
  13. #include <xview/scrollbar.h>
  14. #include <xview/svrimage.h>
  15. #include <xview/termsw.h>
  16. #include <xview/text.h>
  17. #include <xview/tty.h>
  18. #include <xview/xv_xrect.h>
  19. #include <gcm.h>
  20. #include "Region_ui.h"
  21.  
  22. /*
  23.  * Initialize an instance of object `RegionPopup'.
  24.  */
  25. Region_RegionPopup_objects *
  26. Region_RegionPopup_objects_initialize(Region_RegionPopup_objects *ip, Xv_opaque owner)
  27. {
  28.     if (!ip && !(ip = (Region_RegionPopup_objects *) calloc(1, sizeof (Region_RegionPopup_objects))))
  29.         return (Region_RegionPopup_objects *) NULL;
  30.     if (!ip->RegionPopup)
  31.         ip->RegionPopup = Region_RegionPopup_RegionPopup_create(ip, owner);
  32.     if (!ip->controls1)
  33.         ip->controls1 = Region_RegionPopup_controls1_create(ip, ip->RegionPopup);
  34.     if (!ip->TimeLineMsg)
  35.         ip->TimeLineMsg = Region_RegionPopup_TimeLineMsg_create(ip, ip->controls1);
  36.     if (!ip->TimeLineDocMsg)
  37.         ip->TimeLineDocMsg = Region_RegionPopup_TimeLineDocMsg_create(ip, ip->controls1);
  38.     if (!ip->NumberRegionMsg)
  39.         ip->NumberRegionMsg = Region_RegionPopup_NumberRegionMsg_create(ip, ip->controls1);
  40.     if (!ip->RegionCountMsg)
  41.         ip->RegionCountMsg = Region_RegionPopup_RegionCountMsg_create(ip, ip->controls1);
  42.     if (!ip->RegionSelectMsg)
  43.         ip->RegionSelectMsg = Region_RegionPopup_RegionSelectMsg_create(ip, ip->controls1);
  44.     if (!ip->RegionSelectValueMsg)
  45.         ip->RegionSelectValueMsg = Region_RegionPopup_RegionSelectValueMsg_create(ip, ip->controls1);
  46.     if (!ip->RegionListHeaderMsg)
  47.         ip->RegionListHeaderMsg = Region_RegionPopup_RegionListHeaderMsg_create(ip, ip->controls1);
  48.     if (!ip->RegionList)
  49.         ip->RegionList = Region_RegionPopup_RegionList_create(ip, ip->controls1);
  50.     if (!ip->CurrentRegionMsg)
  51.         ip->CurrentRegionMsg = Region_RegionPopup_CurrentRegionMsg_create(ip, ip->controls1);
  52.     if (!ip->StartRegionMsg)
  53.         ip->StartRegionMsg = Region_RegionPopup_StartRegionMsg_create(ip, ip->controls1);
  54.     if (!ip->StartRegionValueMsg)
  55.         ip->StartRegionValueMsg = Region_RegionPopup_StartRegionValueMsg_create(ip, ip->controls1);
  56.     if (!ip->EndRegionMsg)
  57.         ip->EndRegionMsg = Region_RegionPopup_EndRegionMsg_create(ip, ip->controls1);
  58.     if (!ip->EndRegionValueMsg)
  59.         ip->EndRegionValueMsg = Region_RegionPopup_EndRegionValueMsg_create(ip, ip->controls1);
  60.     if (!ip->RegionLabelText)
  61.         ip->RegionLabelText = Region_RegionPopup_RegionLabelText_create(ip, ip->controls1);
  62.     if (!ip->InsertRegionButton)
  63.         ip->InsertRegionButton = Region_RegionPopup_InsertRegionButton_create(ip, ip->controls1);
  64.     if (!ip->DeleteRegionButton)
  65.         ip->DeleteRegionButton = Region_RegionPopup_DeleteRegionButton_create(ip, ip->controls1);
  66.     if (!ip->ModifyRegionButton)
  67.         ip->ModifyRegionButton = Region_RegionPopup_ModifyRegionButton_create(ip, ip->controls1);
  68.     if (!ip->ClearAllRegionButton)
  69.         ip->ClearAllRegionButton = Region_RegionPopup_ClearAllRegionButton_create(ip, ip->controls1);
  70.     if (!ip->RegionDoneButton)
  71.         ip->RegionDoneButton = Region_RegionPopup_RegionDoneButton_create(ip, ip->controls1);
  72.     return ip;
  73. }
  74.  
  75. /*
  76.  * Create object `RegionPopup' in the specified instance.
  77.  */
  78. Xv_opaque
  79. Region_RegionPopup_RegionPopup_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
  80. {
  81.     Xv_opaque    obj;
  82.     
  83.     obj = xv_create(owner, FRAME_CMD,
  84.         XV_KEY_DATA, INSTANCE, ip,
  85.         XV_WIDTH, 444,
  86.         XV_HEIGHT, 274,
  87.         XV_LABEL, "Region Info Window",
  88.         FRAME_SHOW_FOOTER, TRUE,
  89.         FRAME_SHOW_RESIZE_CORNER, FALSE,
  90.         FRAME_CMD_PUSHPIN_IN, FALSE,
  91.         NULL);
  92.     xv_set(xv_get(obj, FRAME_CMD_PANEL), WIN_SHOW, FALSE, NULL);
  93.     return obj;
  94. }
  95.  
  96. /*
  97.  * Create object `controls1' in the specified instance.
  98.  */
  99. Xv_opaque
  100. Region_RegionPopup_controls1_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
  101. {
  102.     Xv_opaque    obj;
  103.     
  104.     obj = xv_create(owner, PANEL,
  105.         XV_KEY_DATA, INSTANCE, ip,
  106.         XV_X, 0,
  107.         XV_Y, 0,
  108.         XV_WIDTH, WIN_EXTEND_TO_EDGE,
  109.         XV_HEIGHT, WIN_EXTEND_TO_EDGE,
  110.         WIN_BORDER, FALSE,
  111.         NULL);
  112.     gcm_initialize_colors(obj, "Light Gray", NULL);
  113.     return obj;
  114. }
  115.  
  116. /*
  117.  * Create object `TimeLineMsg' in the specified instance.
  118.  */
  119. Xv_opaque
  120. Region_RegionPopup_TimeLineMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
  121. {
  122.     Xv_opaque    obj;
  123.     
  124.     obj = xv_create(owner, PANEL_MESSAGE,
  125.         XV_KEY_DATA, INSTANCE, ip,
  126.         XV_X, 16,
  127.         XV_Y, 8,
  128.         PANEL_ITEM_COLOR, gcm_color_index("Black"),
  129.         PANEL_LABEL_STRING, "TimeLine Editor  : ",
  130.         PANEL_LABEL_BOLD, TRUE,
  131.         NULL);
  132.     return obj;
  133. }
  134.  
  135. /*
  136.  * Create object `TimeLineDocMsg' in the specified instance.
  137.  */
  138. Xv_opaque
  139. Region_RegionPopup_TimeLineDocMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
  140. {
  141.     Xv_opaque    obj;
  142.     
  143.     obj = xv_create(owner, PANEL_MESSAGE,
  144.         XV_KEY_DATA, INSTANCE, ip,
  145.         XV_X, 144,
  146.         XV_Y, 8,
  147.         PANEL_ITEM_COLOR, gcm_color_index("Black"),
  148.         PANEL_LABEL_STRING, "docname",
  149.         PANEL_LABEL_BOLD, TRUE,
  150.         NULL);
  151.     return obj;
  152. }
  153.  
  154. /*
  155.  * Create object `NumberRegionMsg' in the specified instance.
  156.  */
  157. Xv_opaque
  158. Region_RegionPopup_NumberRegionMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
  159. {
  160.     Xv_opaque    obj;
  161.     
  162.     obj = xv_create(owner, PANEL_MESSAGE,
  163.         XV_KEY_DATA, INSTANCE, ip,
  164.         XV_X, 20,
  165.         XV_Y, 28,
  166.         PANEL_ITEM_COLOR, gcm_color_index("Black"),
  167.         PANEL_LABEL_STRING, "# of regions        :",
  168.         PANEL_LABEL_BOLD, TRUE,
  169.         NULL);
  170.     return obj;
  171. }
  172.  
  173. /*
  174.  * Create object `RegionCountMsg' in the specified instance.
  175.  */
  176. Xv_opaque
  177. Region_RegionPopup_RegionCountMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
  178. {
  179.     Xv_opaque    obj;
  180.     
  181.     obj = xv_create(owner, PANEL_MESSAGE,
  182.         XV_KEY_DATA, INSTANCE, ip,
  183.         XV_X, 144,
  184.         XV_Y, 28,
  185.         PANEL_ITEM_COLOR, gcm_color_index("Black"),
  186.         PANEL_LABEL_STRING, "0",
  187.         PANEL_LABEL_BOLD, TRUE,
  188.         NULL);
  189.     return obj;
  190. }
  191.  
  192. /*
  193.  * Create object `RegionSelectMsg' in the specified instance.
  194.  */
  195. Xv_opaque
  196. Region_RegionPopup_RegionSelectMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
  197. {
  198.     Xv_opaque    obj;
  199.     
  200.     obj = xv_create(owner, PANEL_MESSAGE,
  201.         XV_KEY_DATA, INSTANCE, ip,
  202.         XV_X, 280,
  203.         XV_Y, 28,
  204.         PANEL_ITEM_COLOR, gcm_color_index("Black"),
  205.         PANEL_LABEL_STRING, "Selected region  :",
  206.         PANEL_LABEL_BOLD, TRUE,
  207.         NULL);
  208.     return obj;
  209. }
  210.  
  211. /*
  212.  * Create object `RegionSelectValueMsg' in the specified instance.
  213.  */
  214. Xv_opaque
  215. Region_RegionPopup_RegionSelectValueMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
  216. {
  217.     Xv_opaque    obj;
  218.     
  219.     obj = xv_create(owner, PANEL_MESSAGE,
  220.         XV_KEY_DATA, INSTANCE, ip,
  221.         XV_X, 404,
  222.         XV_Y, 28,
  223.         PANEL_ITEM_COLOR, gcm_color_index("Black"),
  224.         PANEL_LABEL_STRING, "0",
  225.         PANEL_LABEL_BOLD, TRUE,
  226.         NULL);
  227.     return obj;
  228. }
  229.  
  230. /*
  231.  * Create object `RegionListHeaderMsg' in the specified instance.
  232.  */
  233. Xv_opaque
  234. Region_RegionPopup_RegionListHeaderMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
  235. {
  236.     Xv_opaque    obj;
  237.     
  238.     obj = xv_create(owner, PANEL_MESSAGE,
  239.         XV_KEY_DATA, INSTANCE, ip,
  240.         XV_X, 40,
  241.         XV_Y, 48,
  242.         PANEL_ITEM_COLOR, gcm_color_index("Black"),
  243.         PANEL_LABEL_STRING, "Region #                      Label                     Start          End  ",
  244.         PANEL_LABEL_BOLD, FALSE,
  245.         NULL);
  246.     return obj;
  247. }
  248.  
  249. /*
  250.  * Create object `RegionList' in the specified instance.
  251.  */
  252. Xv_opaque
  253. Region_RegionPopup_RegionList_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
  254. {
  255.     extern int        RegionListNotify(Panel_item, char *, Xv_opaque, Panel_list_op, Event *, int);
  256.     Xv_opaque    obj;
  257.     
  258.     obj = xv_create(owner, PANEL_LIST,
  259.         XV_KEY_DATA, INSTANCE, ip,
  260.         XV_X, 8,
  261.         XV_Y, 68,
  262.         PANEL_LIST_WIDTH, 400,
  263.         PANEL_LIST_DISPLAY_ROWS, 4,
  264.         PANEL_ITEM_COLOR, gcm_color_index("Black"),
  265.         PANEL_LAYOUT, PANEL_HORIZONTAL,
  266.         PANEL_READ_ONLY, TRUE,
  267.         PANEL_CHOOSE_ONE, TRUE,
  268.         PANEL_CHOOSE_NONE, TRUE,
  269.         PANEL_NOTIFY_PROC, RegionListNotify,
  270.         NULL);
  271.     return obj;
  272. }
  273.  
  274. /*
  275.  * Create object `CurrentRegionMsg' in the specified instance.
  276.  */
  277. Xv_opaque
  278. Region_RegionPopup_CurrentRegionMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
  279. {
  280.     Xv_opaque    obj;
  281.     
  282.     obj = xv_create(owner, PANEL_MESSAGE,
  283.         XV_KEY_DATA, INSTANCE, ip,
  284.         XV_X, 24,
  285.         XV_Y, 172,
  286.         PANEL_ITEM_COLOR, gcm_color_index("Black"),
  287.         PANEL_LABEL_STRING, "Current Region :  ",
  288.         PANEL_LABEL_BOLD, TRUE,
  289.         NULL);
  290.     return obj;
  291. }
  292.  
  293. /*
  294.  * Create object `StartRegionMsg' in the specified instance.
  295.  */
  296. Xv_opaque
  297. Region_RegionPopup_StartRegionMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
  298. {
  299.     Xv_opaque    obj;
  300.     
  301.     obj = xv_create(owner, PANEL_MESSAGE,
  302.         XV_KEY_DATA, INSTANCE, ip,
  303.         XV_X, 24,
  304.         XV_Y, 192,
  305.         PANEL_ITEM_COLOR, gcm_color_index("Black"),
  306.         PANEL_LABEL_STRING, "Start  : ",
  307.         PANEL_LABEL_BOLD, TRUE,
  308.         NULL);
  309.     return obj;
  310. }
  311.  
  312. /*
  313.  * Create object `StartRegionValueMsg' in the specified instance.
  314.  */
  315. Xv_opaque
  316. Region_RegionPopup_StartRegionValueMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
  317. {
  318.     Xv_opaque    obj;
  319.     
  320.     obj = xv_create(owner, PANEL_MESSAGE,
  321.         XV_KEY_DATA, INSTANCE, ip,
  322.         XV_X, 80,
  323.         XV_Y, 192,
  324.         PANEL_ITEM_COLOR, gcm_color_index("Black"),
  325.         PANEL_LABEL_STRING, "  00:00",
  326.         PANEL_LABEL_BOLD, TRUE,
  327.         NULL);
  328.     return obj;
  329. }
  330.  
  331. /*
  332.  * Create object `EndRegionMsg' in the specified instance.
  333.  */
  334. Xv_opaque
  335. Region_RegionPopup_EndRegionMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
  336. {
  337.     Xv_opaque    obj;
  338.     
  339.     obj = xv_create(owner, PANEL_MESSAGE,
  340.         XV_KEY_DATA, INSTANCE, ip,
  341.         XV_X, 192,
  342.         XV_Y, 192,
  343.         PANEL_ITEM_COLOR, gcm_color_index("Black"),
  344.         PANEL_LABEL_STRING, "End : ",
  345.         PANEL_LABEL_BOLD, TRUE,
  346.         NULL);
  347.     return obj;
  348. }
  349.  
  350. /*
  351.  * Create object `EndRegionValueMsg' in the specified instance.
  352.  */
  353. Xv_opaque
  354. Region_RegionPopup_EndRegionValueMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
  355. {
  356.     Xv_opaque    obj;
  357.     
  358.     obj = xv_create(owner, PANEL_MESSAGE,
  359.         XV_KEY_DATA, INSTANCE, ip,
  360.         XV_X, 236,
  361.         XV_Y, 192,
  362.         PANEL_ITEM_COLOR, gcm_color_index("Black"),
  363.         PANEL_LABEL_STRING, "  00:00",
  364.         PANEL_LABEL_BOLD, TRUE,
  365.         NULL);
  366.     return obj;
  367. }
  368.  
  369. /*
  370.  * Create object `RegionLabelText' in the specified instance.
  371.  */
  372. Xv_opaque
  373. Region_RegionPopup_RegionLabelText_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
  374. {
  375.     Xv_opaque    obj;
  376.     
  377.     obj = xv_create(owner, PANEL_TEXT,
  378.         XV_KEY_DATA, INSTANCE, ip,
  379.         XV_X, 24,
  380.         XV_Y, 212,
  381.         PANEL_VALUE_DISPLAY_LENGTH, 22,
  382.         PANEL_VALUE_STORED_LENGTH, 256,
  383.         PANEL_ITEM_COLOR, gcm_color_index("Black"),
  384.         PANEL_LABEL_STRING, "Label : ",
  385.         PANEL_LAYOUT, PANEL_HORIZONTAL,
  386.         PANEL_READ_ONLY, FALSE,
  387.         NULL);
  388.     return obj;
  389. }
  390.  
  391. /*
  392.  * Create object `InsertRegionButton' in the specified instance.
  393.  */
  394. Xv_opaque
  395. Region_RegionPopup_InsertRegionButton_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
  396. {
  397.     extern void        InsertRegion(Panel_item, Event *);
  398.     Xv_opaque    obj;
  399.     
  400.     obj = xv_create(owner, PANEL_BUTTON,
  401.         XV_KEY_DATA, INSTANCE, ip,
  402.         XV_X, 32,
  403.         XV_Y, 240,
  404.         PANEL_ITEM_COLOR, gcm_color_index("Black"),
  405.         PANEL_LABEL_STRING, "Insert",
  406.         PANEL_NOTIFY_PROC, InsertRegion,
  407.         NULL);
  408.     return obj;
  409. }
  410.  
  411. /*
  412.  * Create object `DeleteRegionButton' in the specified instance.
  413.  */
  414. Xv_opaque
  415. Region_RegionPopup_DeleteRegionButton_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
  416. {
  417.     extern void        DeleteRegion(Panel_item, Event *);
  418.     Xv_opaque    obj;
  419.     
  420.     obj = xv_create(owner, PANEL_BUTTON,
  421.         XV_KEY_DATA, INSTANCE, ip,
  422.         XV_X, 108,
  423.         XV_Y, 240,
  424.         PANEL_ITEM_COLOR, gcm_color_index("Black"),
  425.         PANEL_LABEL_STRING, "Delete",
  426.         PANEL_NOTIFY_PROC, DeleteRegion,
  427.         NULL);
  428.     return obj;
  429. }
  430.  
  431. /*
  432.  * Create object `ModifyRegionButton' in the specified instance.
  433.  */
  434. Xv_opaque
  435. Region_RegionPopup_ModifyRegionButton_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
  436. {
  437.     extern void        ModifyRegion(Panel_item, Event *);
  438.     Xv_opaque    obj;
  439.     
  440.     obj = xv_create(owner, PANEL_BUTTON,
  441.         XV_KEY_DATA, INSTANCE, ip,
  442.         XV_X, 184,
  443.         XV_Y, 240,
  444.         PANEL_ITEM_COLOR, gcm_color_index("Black"),
  445.         PANEL_LABEL_STRING, "Modify",
  446.         PANEL_NOTIFY_PROC, ModifyRegion,
  447.         NULL);
  448.     return obj;
  449. }
  450.  
  451. /*
  452.  * Create object `ClearAllRegionButton' in the specified instance.
  453.  */
  454. Xv_opaque
  455. Region_RegionPopup_ClearAllRegionButton_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
  456. {
  457.     extern void        ClearAllRegion(Panel_item, Event *);
  458.     Xv_opaque    obj;
  459.     
  460.     obj = xv_create(owner, PANEL_BUTTON,
  461.         XV_KEY_DATA, INSTANCE, ip,
  462.         XV_X, 264,
  463.         XV_Y, 240,
  464.         PANEL_ITEM_COLOR, gcm_color_index("Black"),
  465.         PANEL_LABEL_STRING, "Clear All",
  466.         PANEL_NOTIFY_PROC, ClearAllRegion,
  467.         NULL);
  468.     return obj;
  469. }
  470.  
  471. /*
  472.  * Create object `RegionDoneButton' in the specified instance.
  473.  */
  474. Xv_opaque
  475. Region_RegionPopup_RegionDoneButton_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
  476. {
  477.     extern void        CloseRegionPopup(Panel_item, Event *);
  478.     Xv_opaque    obj;
  479.     
  480.     obj = xv_create(owner, PANEL_BUTTON,
  481.         XV_KEY_DATA, INSTANCE, ip,
  482.         XV_X, 352,
  483.         XV_Y, 240,
  484.         PANEL_ITEM_COLOR, gcm_color_index("Black"),
  485.         PANEL_LABEL_STRING, "Done",
  486.         PANEL_NOTIFY_PROC, CloseRegionPopup,
  487.         NULL);
  488.     return obj;
  489. }
  490.  
  491.